blob: 3fe98f8cfdf4993a740447d3149680159ca112ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<script lang="ts" context="module">
export async function load({ page }) {
const res = await fetch(`/api/matches/${page.params["match_id"]}`, {
headers: {
"Content-Type": "application/json",
},
});
if (res.ok) {
return {
props: {
matchLog: await res.text(),
},
};
}
return {
status: res.status,
error: new Error("failed to load match"),
};
}
</script>
<script lang="ts">
import Visualizer from "$lib/components/Visualizer.svelte";
export let matchLog: string;
</script>
<div>
<Visualizer {matchLog} />
</div>
|